package com.bruce.pullrefresh;

import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;

/**
 * 描述当前类的作用
 *
 * @author LiXiaoLong
 * @version 1.0
 * @since 2015-09-15 14:31
 */
public abstract class BaseRecyclerAdapter extends RecyclerView.Adapter {
    public static final int ITEM_HEADER = 1;
    public static final int ITEM_NORMAL = 2;

    public View header;

    public View getHeader() {
        return header;
    }

    public void setHeader(View header) {
        this.header = header;
    }

    public abstract RecyclerView.ViewHolder onCreateHeader();

    public abstract void onBindHeader(RecyclerView.ViewHolder holder, int position);

    public abstract RecyclerView.ViewHolder onCreateView(ViewGroup parent, int viewType);

    public abstract void onBindView(RecyclerView.ViewHolder holder, final int position);
}
